<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const user = {
        lastName: 'jack',
        firstName: 'zhang',
        get fullName() {
          return `${this.lastName} ${this.firstName}`;
        },
      };
      user.lastName = 'lili';
      // 计算属性（方法）
      console.log(user.fullName);

      // console.log(user.fullName());

      // user.fistName = 'li';
      // console.log(user.fullName); //  'jack zhang',
    </script>
  </body>
</html>
